package com.winterwar.base;

import java.util.Date;
import java.util.Set;

public class User extends BaseObject{

	/**
	 * 
	 */
	private static final long serialVersionUID = -9123579316113848392L;
	
	private Integer userID;
	private String username;
	private String firstName;
	private String lastName;
	private String password;
	private String passwordConfirm;
	private String email;
	private String phoneNumber;
	private String address1;
	private String address2;
	private String zipCode;
	private String city;
	private String state;
	private Integer level;
	private Boolean inactive;
	private Date created;
	
	@SuppressWarnings("unused")
	private Integer submittedEventsSize;
	@SuppressWarnings("unused")
	private Integer registrationsSize;
	
	private Set<Registration> registrations;
	private Set<Event> submittedEvents;
	
	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}


	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Set<Event> getSubmittedEvents() {
		return submittedEvents;
	}

	public void setSubmittedEvents(Set<Event> submittedEvents) {
		this.submittedEvents = submittedEvents;
		this.submittedEventsSize = submittedEvents.size();
	}
	
	public int hashCode(){
		if(username != null)
			return username.hashCode();
		else {
			String x = "";
			return x.hashCode();
		}
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public Integer getUserID() {
		return userID;
	}

	public void setUserID(Integer userID) {
		this.userID = userID;
	}

	public String getPasswordConfirm() {
		return passwordConfirm;
	}

	public void setPasswordConfirm(String passwordConfirm) {
		this.passwordConfirm = passwordConfirm;
	}

	public Set<Registration> getRegistrations() {
		return registrations;
	}

	public void setRegistrations(Set<Registration> registrations) {
		this.registrations = registrations;
		this.registrationsSize = registrations.size();
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getCreated() {
		return created;
	}

	public void setSubmittedEventsSize(Integer submittedEventsSize) {
		this.submittedEventsSize = submittedEventsSize;
	}

	public Integer getSubmittedEventsSize() {
		return submittedEvents.size();
	}

	public void setRegistrationsSize(Integer registrationsSize) {
		this.registrationsSize = registrationsSize;
	}

	public Integer getRegistrationsSize() {
		return registrations.size();
	}

	public Boolean getInactive() {
		return inactive;
	}

	public void setInactive(Boolean inactive) {
		this.inactive = inactive;
	}
}
